import request from '@/utils/request'

// 根据id查询用户角色
export const getUserRoleById = (id) =>
  request({
    url: `/sys/userRole/${id}`,
    method: 'get'
  })

// 分页查询用户角色
export const listUserRolePage = (search) =>
  request({
    url: '/sys/userRole/list',
    method: 'post',
    data: search
  })

// 查询所有用户角色
export const listUserRoleAll = (search) =>
  request({
    url: '/sys/userRole/listAll',
    method: 'post',
    data: search
  })

// 保存/更新用户角色
export const saveUserRole = (userRole) =>
  request({
    url: '/sys/userRole/save',
    method: 'post',
    data: userRole
  })

// 删除用户角色
export const deleteUserRole = (userRole) =>
  request({
    url: '/sys/userRole/delete',
    method: 'post',
    data: userRole
  })

// 批量保存/更新用户角色
export const bulkInsertUserRole = (userRoles) =>
  request({
    url: '/sys/userRole/bulkInsert',
    method: 'post',
    data: userRoles
  })

// 批量更新用户角色
export const bulkUpdateUserRole = (userRoles) =>
  request({
    url: '/sys/userRole/bulkUpdate',
    method: 'post',
    data: userRoles
  })

// 批量删除用户角色
export const bulkDeleteUserRole = (userRoles) =>
  request({
    url: '/sys/userRole/bulkDelete',
    method: 'post',
    data: userRoles
  }) 